/*
 * Copyright (c) 2025 Industrial Software Feature Database
 */
package com.comac.ins.isfd.domain.bo;

import com.comac.ins.common.core.validate.AddGroup;
import com.comac.ins.common.core.validate.EditGroup;
import com.comac.ins.common.mybatis.core.domain.BaseEntity;
import com.comac.ins.isfd.domain.IsfdDatasourceConfiguration;
import io.github.linpeilie.annotations.AutoMapper;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * 数据源配置业务对象 isfd_datasource_configuration
 *
 * @author Lion Li
 * @date 2024-10-10
 */
@Data
@EqualsAndHashCode(callSuper = true)
@AutoMapper(target = IsfdDatasourceConfiguration.class, reverseConvertGenerate = false)
public class IsfdDatasourceConfigurationBo extends BaseEntity {

    /**
     * 主键
     */
    @NotNull(message = "主键不能为空", groups = { EditGroup.class })
    private Long id;

    /**
     * 数据源类型：MySQL、MongoDB、Oracle、Doris、FTP、API
     */
    @NotBlank(message = "数据源类型：MySQL、MongoDB、Oracle、Doris、FTP、API不能为空", groups = { AddGroup.class, EditGroup.class })
    private String dataSourceType;

    /**
     * 数据源名称
     */
    @NotBlank(message = "数据源名称不能为空", groups = { AddGroup.class, EditGroup.class })
    private String dataSourceName;

    /**
     * 数据源描述
     */
    @NotBlank(message = "数据源描述不能为空", groups = { AddGroup.class, EditGroup.class })
    private String dataSourceDescriptive;

    /**
     * URL或连接字符串
     */
    @NotBlank(message = "URL或连接字符串不能为空", groups = { AddGroup.class, EditGroup.class })
    private String url;

    /**
     * 用户名
     */
    @NotBlank(message = "用户名不能为空", groups = { AddGroup.class, EditGroup.class })
    private String userName;

    /**
     * 密码
     */
    @NotBlank(message = "密码不能为空", groups = { AddGroup.class, EditGroup.class })
    private String secretCode;

    /**
     * 请求类型：POST,GET（仅针对API类型）
     */
    @NotBlank(message = "请求类型：POST,GET（仅针对API类型）不能为空", groups = { AddGroup.class, EditGroup.class })
    private String requestType;

    /**
     * 默认请求头（仅针对API类型）
     */
    @NotBlank(message = "默认请求头（仅针对API类型）不能为空", groups = { AddGroup.class, EditGroup.class })
    private String defaultRequestHeader;

    /**
     * 请求参数（仅针对API类型）
     */
    @NotBlank(message = "请求参数（仅针对API类型）不能为空", groups = { AddGroup.class, EditGroup.class })
    private String requestParameters;

    /**
     * Protoco：FTP,SFTP（仅针对FTP类型）
     */
    @NotBlank(message = "Protoco：FTP,SFTP（仅针对FTP类型）不能为空", groups = { AddGroup.class, EditGroup.class })
    private String protoco;

    /**
     * 表（集合）英文名称，多个的话用逗号隔开
     */
    @NotBlank(message = "表（集合）英文名称，多个的话用逗号隔开不能为空", groups = { AddGroup.class, EditGroup.class })
    private String storageLocation;

    /**
     * 是否删除，默认0-未删除，1-已删除
     */
    @NotNull(message = "是否删除，默认0-未删除，1-已删除不能为空", groups = { AddGroup.class, EditGroup.class })
    private Integer isDeleted;


}
